//
//  main.m
//  foofie简凡
//
//  Created by mac on 16-4-11.
//  Copyright (c) 2016年 hh. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Atom.h"
#import "Person.h"
#import "Mouse.h"
int main(int argc, const char * argv[])
{

    
        @autoreleasepool {
            
            // insert code here...
            NSLog(@"Hello, World!");
            Atom *atom=[[Atom alloc] init];
            NSLog(@"Atom chemcal element name: %@",atom.chemicalElement);
            person *p=[[person alloc]init];
            p.name=@"黄辉";
            /* Animal *ani=p;
             [ani eat];
             [ani sleep];
             
             [p eat];
             [p sleep];
             [p talk:@"我饿了"];*/
            
            Mouse *m=[[Mouse alloc]init];
            m.name=@"老鼠";
            NSArray *arr=@[p,m];
            for (int i=0; i<arr.count; i++) {
                Animal *ani=arr[i];
                [ani eat];
                [ani sleep];
            }
            
        
        // insert code here...
        NSLog(@"Hello, World!");
        
    }
    return 0;
}

